package com.fy.service.imbusiness.service.impl;


import com.fy.framework.component.config.RedissonComponet;
import com.fy.service.imbusiness.service.ValidateCodeService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

import static com.fy.service.component.util.RedisKeyUtil.deviceIdKey;

/**
 * @author zhshuo
 * @date 2021/11/29 17:05
 **/
@Slf4j
@Service
@Deprecated
@AllArgsConstructor
public class ValidateCodeServiceImpl implements ValidateCodeService {

    RedissonComponet redissonComponet;

    @Override
    public void saveValidateCode(String validateCode,String deviceId) {
        redissonComponet.set(deviceIdKey(deviceId),validateCode,60, TimeUnit.SECONDS);
    }
}
